package com.jiangyao.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 访问日志表
 * </p>
 *
 * @author xiangyan
 * @since 2020-09-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="访问日志表")
public class ApiAccessLog extends Model<ApiAccessLog> {

    private static final long serialVersionUID=1L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value ="主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 登录凭证token
     */
    @ApiModelProperty(value ="登录凭证token")
    private String token;

    /**
     * 用户ID
     */
    @ApiModelProperty(value ="用户ID")
    private Integer userId;

    /**
     * 访问链接
     */
    @ApiModelProperty(value ="访问链接")
    private String accessUrl;

    /**
     * ip地址
     */
    @ApiModelProperty(value ="ip地址")
    private String ip;

    /**
     * 创建时间
     */
    @ApiModelProperty(value ="创建时间")
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
